// function_grid_item.dart
import 'package:flutter/material.dart';

class FunctionGridItem extends StatelessWidget {
  final double iconSize;
  final double textSize;
  final String? name;
  final String? icon;

  const FunctionGridItem({
    super.key,
    required this.name,
    required this.icon,
    this.iconSize = 24,
    this.textSize = 12,
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.all(0),
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Image.asset(
            'assets/images/icons/$icon@3x.png',
            width: iconSize,
            height: iconSize,
          ),
          const SizedBox(height: 4),
          Text(
            name.toString(),
            style: TextStyle(fontSize: textSize, fontWeight: FontWeight.w400),
          ),
        ],
      ),
    );
  }
}
